<template>
  <div>
    <V-CommonHeaderLeft>
      <div id="app">
        <el-row>
          <!-- 头部 -->
          <div class="header">
            <el-col :span="4" class="header-nav">
              <router-link to="/">首页&nbsp;&nbsp;/</router-link>
              <router-link to="/">应用&nbsp;&nbsp;/</router-link>
              <router-link to="/">修改参考进价</router-link>
            </el-col>
            <el-col :span="1" :offset="18">
              <img src alt class="shuImg">
            </el-col>
          </div>
        </el-row>
        <div class="content">
          <div class="contents-header">
            <p>
              <span>1</span>
              <span>上传导入文件</span>
            </p>
            <p>
              <span>2</span>
              <span>预览导入数据</span>
            </p>
            <p>
              <span>3</span>
              <span>导入完成</span>
            </p>
          </div>
          <div class="contents-center">
            <h3>1、下载修改模板</h3>
            <el-cascader :options="options" :props="props" clearable class="contents-centerInput"></el-cascader>
            <span
              class="el-icon-download"
              style="font-size:12px;margin-left:20px;cursor:pointer"
            >下载商品参考进价修改模板</span>
            <p>
              <span>填写说明</span>
              <span>（1）将修改后的参考进价填写到“（改）参考进价”列内</span>
              <span>（2）“（改）参考进价”列为必填项，不可留空，留空会造成导入失败</span>
              <span>（3）若不修改某商品的“参考进价”，请将该行商品整行删除</span>
            </p>
          </div>
          <div class="contents-footer">
            <h3>2、添加商品价格数据</h3>
            <el-upload
              class="upload-demo"
              action="https://jsonplaceholder.typicode.com/posts/"
              :on-change="handleChange"
              :file-list="fileList"
            >
              <el-button size="small" type="primary">点击上传</el-button>
            </el-upload>
          </div>
        </div>
        <div class="footer">
          <button @click="next()">下一步</button>
          <button>取消</button>
        </div>
      </div>
    </V-CommonHeaderLeft>
  </div>
</template>

<script>
import VCommonHeaderLeft from './../common/vCommonHeaderLeft/VCommonHeaderLeft'
export default {
  components: {
    VCommonHeaderLeft
  },
  data () {
    return {
      props: { multiple: true },
      options: [{
        value: 1,
        label: '东南',
        children: [{
          value: 2,
          label: '上海',
          children: [
            { value: 3, label: '普陀' },
            { value: 4, label: '黄埔' },
            { value: 5, label: '徐汇' }
          ]
        }, {
          value: 7,
          label: '江苏',
          children: [
            { value: 8, label: '南京' },
            { value: 9, label: '苏州' },
            { value: 10, label: '无锡' }
          ]
        }, {
          value: 12,
          label: '浙江',
          children: [
            { value: 13, label: '杭州' },
            { value: 14, label: '宁波' },
            { value: 15, label: '嘉兴' }
          ]
        }]
      }],
      // 上传文件
      fileList: []
    }
  },
  methods: {
    handleChange (file, fileList) {
      this.fileList = fileList.slice(-3)
    },
    next () {
      this.$router.push({
        path: '/applicationPrice'
      })
      // console.log(111)
    }
  }
}
</script>

<style lang="scss" scoped>
#app {
  width: 100%;
  background-color: #f2f5f7;
  height: 100%;
  padding: 15px 10px 0px 10px;
}
.header {
  height: 45px;
  .header-nav {
    line-height: 30px;
    font-size: 12px;
    display: flex;
    justify-content: space-around;
    padding-left: 10px;
    span {
      display: inline-block;
      margin-left: 10px;
    }
    a {
      color: #999999;
    }
    a:hover {
      color: #20ade5;
    }
  }
  .header-img {
    width: 25px;
    height: 25px;
    border-radius: 5px;
    border: 1px solid #dce4e7;
  }
}
.header-nav a:nth-child(3) {
  color: #333;
}
.header-nav a:nth-child(3):hover {
  color: #333;
}
.shuImg {
  width: 20px;
  height: 20px;
  border: 1px solid;
}
.content {
  padding: 30px 30px 0px 30px;
  background-color: #fff;
  height: 450px;
  overflow-x: hidden;
  overflow-y: scroll;
}
.contents-header {
  display: flex;
  justify-content: space-between;
}
.contents-header > p {
  width: 365px;
  height: 50px;
  font-size: 14px;
  text-align: center;
  line-height: 50px;
}
.contents-header > p:nth-child(1) {
  background-color: #c9e5ff;
  color: #20ade5;
}
.contents-header > p span:nth-child(1) {
  width: 25px;
  height: 25px;
  border-radius: 50%;
  text-align: center;
  line-height: 25px;
  display: inline-block;
  margin-right: 10px;
  color: #fff;
}
.contents-header > p:nth-child(1) span:nth-child(1) {
  background-color: #20ade5;
}
.contents-header > p:nth-child(2) {
  background-color: #fbfbfb;
}
.contents-header > p:nth-child(2) span:nth-child(1) {
  background-color: #e3e3e3;
}
.contents-header > p:nth-child(3) {
  background-color: #fbfbfb;
}
.contents-header > p:nth-child(3) span:nth-child(1) {
  background-color: #e3e3e3;
}
.contents-center {
  width: calc(100%-20px);
  height: 220px;
  background-color: #fbfbfb;
  margin-top: 50px;
  padding: 20px 0px 0px 20px;
}
.contents-center > h3 {
  font-weight: normal;
  font-size: 18px;
  margin-bottom: 15px;
}
.contents-center > p {
  margin-top: 20px;
}
.contents-center > p span {
  display: block;
  font-size: 12px;
  color: #666666;
  line-height: 25px;
}
.contents-centerInput /deep/ .el-input__inner {
  height: 30px !important;
}
.contents-centerInput /deep/ ::placeholder {
  font-size: 12px;
}
.contents-footer {
  width: calc(100%-20px);
  height: 100px;
  background-color: #fbfbfb;
  margin: 20px 0px 200px 0px;
  padding: 20px 0px 0px 20px;
}
.contents-footer > h3 {
  font-weight: normal;
  font-size: 18px;
  margin-bottom: 15px;
}
.upload-demo {
  margin: 5px 0px 0px 30px;
}
.footer {
  width: 100%;
  background-color: #fff;
  border-top: 1px solid #e3e3e3;
  height: 60px;
}
.footer > button {
  width: 155px;
  height: 45px;
  background-color: #20ade5;
  font-size: 14px;
  color: #fff;
  border: 0;
  text-align: center;
  line-height: 45px;
  float: right;
  margin: 10px 15px 0px 0px;
  border-radius: 5px;
  cursor: pointer;
}
.footer > button:nth-child(2) {
  background-color: #fff;
  border: 1px solid #20ade5;
  color: #20ade5;
}
</style>
